// LPMolecule.h: interface for the LPMolecule class.
//
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_LPMOLECULE_H__F8E5AFE4_9764_41E6_A7F0_AD6528C618FA__INCLUDED_)
#define AFX_LPMOLECULE_H__F8E5AFE4_9764_41E6_A7F0_AD6528C618FA__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#include "LPAtom.h"
#include "LPConnector.h"
#include "stdio.h"
#include "stdafx.h"
#include <string>
using std::string;

//using std::string;


class LPMolecule  
{
public:
	void connectMoleculeAtoms();
	bool m_autoconnect;
	int LoadPDBMolecule(char *fp);
	string getFileExt(const string& s);
	bool LoadMolecule(char *fp, bool autoconnect=true);
	int getNumberConnectors();
	double getDimension();
	void centerMolecule();
	int getNumberAtoms();
	void ProcessAtom(LPAtom *ptr, bool autoconnect=true);

	//CString DataFile;
	//long FilePos;
	long FileLength;
	//char Record[300];
	char InfoMoleculeName[80];
	//CTokenizer ctoken;

	int LoadXYZMolecule(char *fp);

	LPMolecule();
	virtual ~LPMolecule();
	//int maxatoms;

	int natoms;	
	int ATOM_MAX_NUMBER;
	LPAtom **ListAtoms; //500 atoms max

	int nconnectors;
	int CONNECTOR_MAX_NUMBER;
	LPConnector **ListConnectors;
	double AUTOCONNECTDISTANCE;

};

#endif // !defined(AFX_LPMOLECULE_H__F8E5AFE4_9764_41E6_A7F0_AD6528C618FA__INCLUDED_)
